package hai.com.android_test.utils;

import android.content.Context;
import android.os.Environment;

import java.io.File;

/**
 * Created by 黄海 on 2017/4/28.
 */

public class OsUtils {
    private static final String TAG = "OsUtils";

    public static File getAppFileDir(Context context) {
        boolean flag = Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
        Logger.i(TAG, "Environment.MEDIA_MOUNTED: " + flag);
        if (flag) return context.getExternalFilesDir("");
        else return context.getFilesDir();
    }
}
